<?php echo $header; ?>
<?php echo $top_content ?>
<?php echo $column_left; ?>
<?php echo $column_right; ?>
<div id="content" >
  <div class="top">
    <div class="left"></div>
    <div class="right"></div>
    <div class="center">
      <h1><?php echo $heading_title; ?></h1>
    </div>
  </div>
	<div class="middle">
	  <table class="list">
		    <?php for ($i = 0; $i < 8; $i = $i + 2) { ?>
		    <tr>
		      <?php for ($j = $i; $j < ($i + 2); $j++) { ?>
		      <td>
		      		<div class="tabs_group_top_page1" >
		      			<div id="top_header"><?php if(isset($product_data[$j]['name']) == true ){ echo $product_data[$j]['name']; } ?>
		      			</div>
		      			<?php if(isset($product_data[$j]['Product'][0]['product_id']) == true) { ?>
		      			<div class="top-product">
							<p class="picture">
								<a href="<?php if(isset($product_data[$j]['Product'][0]['href']) == true){ echo $product_data[$j]['Product'][0]['href'];} ?>"><img src="<?php if(isset($product_data[$j]['Product'][0]['thumb']) == true){echo $product_data[$j]['Product'][0]['thumb'];} ?>" /></a>
							</p>
							<div class="info">
								<ul style="padding: 1px; margin-top:0px;">
									<li>
										<a class="link" href="<?php if(isset($product_data[$j]['Product'][0]['href']) == true){echo $product_data[$j]['Product'][0]['href'];} ?>" title=""><?php if(isset($product_data[$j]['Product'][0]['name']) == true){ echo $product_data[$j]['Product'][0]['name'];} ?></a>
									</li>
									<li>
										Giá Bán: <?php if(isset($product_data[$j]['Product'][0]['price']) == true ){echo $product_data[$j]['Product'][0]['price'];} ?>
									</li>
									<li>
										Phạm Vi:<?php if(isset($product_data[$j]['Product'][0]['address']) == true ){echo $product_data[$j]['Product'][0]['address'];} ?>
									</li>
									<li>
										Người bán: <a href="<?php if(isset($product_data[$j]['Product'][0]['href_shop']) == true ){echo $product_data[$j]['Product'][0]['href_shop'];} ?>"> <?php if(isset($product_data[$j]['Product'][0]['username']) == true){ echo $product_data[$j]['Product'][0]['username'];} ?></a>
									</li>
								</ul>
							</div>
							<div class="view-more">
									<a href="<?php if(isset($product_data[$j]['Product'][0]['href_more']) == true ){echo $product_data[$j]['Product'][0]['href_more'];} ?>">Xem Thêm >> </a>
							</div>
						</div>
						<?php } else { ?>
							<div id="main_header"></div>
						<?php } ?>
						<!--  show product -->
						<?php if(isset($product_data[$j]['Product'][1]['product_id']) == true) { ?>
			      			<div id="main_header">
		      					<a style="padding-top:7px; padding-bottom: 7px;" href="<?php echo $product_data[$j]['Product'][1]['href']; ?>"> <?php if(isset($product_data[$j]['Product'][1]['name']) == true){ echo $product_data[$j]['Product'][1]['name'];} ?> - <?php if(isset($product_data[$j]['Product'][1]['price']) == true){ echo $product_data[$j]['Product'][1]['price'];} ?></a>
			      			</div>
		      			<?php } else { ?>
							<div id="main_header"></div>
						<?php } ?>
						<?php if(isset($product_data[$j]['Product'][2]['product_id']) == true) { ?>
			      			<div id="main_header">
			      				<a style="padding-top:4px; padding-bottom: 4px;" href="<?php echo $product_data[$j]['Product'][2]['href']; ?>"><?php if(isset($product_data[$j]['Product'][2]['name']) == true){ echo $product_data[$j]['Product'][2]['name'];} ?> - <?php if(isset($product_data[$j]['Product'][2]['price']) == true){ echo $product_data[$j]['Product'][1]['price'];} ?></a>
			      			</div>
			      		<?php } else { ?>
							<div id="main_header"></div>
						<?php } ?>
						<?php if(isset($product_data[$j]['Product'][3]['product_id']) == true) { ?>
			      			<div id="main_header">
			      				<a style="padding-top:4px; padding-bottom: 4px;" href="<?php echo $product_data[$j]['Product'][3]['href']; ?>"><?php if(isset($product_data[$j]['Product'][3]['name']) == true){ echo $product_data[$j]['Product'][3]['name'];} ?> - <?php if(isset($product_data[$j]['Product'][3]['price']) == true){ echo $product_data[$j]['Product'][3]['price'];} ?></a>
			      			</div>
			      		<?php } else { ?>
							<div id="main_header">
							</div>
						<?php } ?>
						<?php if(isset($product_data[$j]['Product'][4]['product_id']) == true) { ?>
			      			<div id="main_header">
			      				<a style="padding-top:4px; padding-bottom: 4px;" href="<?php echo $product_data[$j]['Product'][4]['href']; ?>"><?php if(isset($product_data[$j]['Product'][4]['name']) == true){ echo $product_data[$j]['Product'][4]['name'];} ?> - <?php if(isset($product_data[$j]['Product'][4]['price']) == true){ echo $product_data[$j]['Product'][4]['price'];} ?></a>
			      			</div>
			      		<?php } else { ?>
							<div id="main_header"></div>
						<?php } ?>
		      		</div>
		      </td>
		      <?php } ?>
		    </tr>
		    <?php } ?>
		</table>
	</div>
  <div class="bottom">
    <div class="left"></div>
    <div class="right"></div>
    <div class="center"></div>
  </div>
</div>
<?php echo $footer; ?>